home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume4 / unaxcess / patch1 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  7.4 KB

  1. Subject: UNaXcess update #1
  2. Newsgroups: mod.sources
  3. Approved: jpn@panda.UUCP
  4.  
  5. Mod.sources:  Volume 4, Issue 117
  6. Submitted by: genrad!decvax!cwruecmp!ncoast!allbery (Brandon S. Allbery)
  7.  
  8. The UNaXcess distribution contained an out-of-date README and install.sh which
  9. were written before the UDL module was added to UNaXcess.  The following
  10. context diff (suitable for input to patch) contains the diffs required to
  11. upgrade the distributed UNaXcess sources.   The change to install.sh creates
  12. an empty default download directory
  13.  
  14. This upgrade also includes a C code bug fix, where an A_WITNESS can't add
  15. messages to a read-only conference.
  16.  
  17. [ There is also a patch to the version of mkconf program distributed with
  18.   UNaXcess - this is one I wrote to replace the original mkconf that had
  19.   to be installed set-uid to root                     - moderator
  20. ]
  21.  
  22. You will have to unshar the patch files, then apply patch on each file
  23. individually (or make the edits by hand).
  24.  
  25. --------------------------------------------
  26. #! /bin/sh
  27. # This is a shell archive, meaning:
  28. # 1. Remove everything above the #! /bin/sh line.
  29. # 2. Save the resulting text in a file.
  30. # 3. Execute the file with /bin/sh (not csh) to create the files:
  31. #    README.pat
  32. #    install.pat
  33. #    mkconf.c.pat
  34. #    msg.c.pat
  35. # This archive created: Mon May 12 08:18:44 1986
  36. export PATH; PATH=/bin:$PATH
  37. echo shar: extracting "'README.pat'" '(1982 characters)'
  38. if test -f 'README.pat'
  39. then
  40.     echo shar: will not over-write existing file "'README.pat'"
  41. else
  42. cat << \SHAR_EOF > 'README.pat'
  43. *** ../temp1/README    Mon May 12 07:36:56 1986
  44. --- README    Mon May 12 07:41:14 1986
  45. ***************
  46. *** 151,156
  47.   escapes (\n \r \t \b \f \e \nnn \a) (\a is bell).  Comments are indicated by
  48.   #; they do NOT have to be at the beginning of a line.
  49.   
  50.   UNaXcess depends on being setuid to its owner, not only for permissions in
  51.   the BBS, but also to insure that the home directory (containing the message
  52.   database and config file) can be located.
  53.  
  54. --- 151,180 -----
  55.   escapes (\n \r \t \b \f \e \nnn \a) (\a is bell).  Comments are indicated by
  56.   #; they do NOT have to be at the beginning of a line.
  57.   
  58. + ---
  59. + The up/download (UDL) module uses a log file for uploads, and a directory for
  60. + downloads.  Both files are created by the install script; "upload-log" is
  61. + empty, and "directory" contains one line:
  62. +     branch file GENERAL; <date> by <sysop name>: General up/downloads
  63. + This is the basic format of a directory entry.  The word "branch" is reserved,
  64. + and indicates that this is the directory entry for the branch itself; files
  65. + in this branch have the word "branch" replaced by the branch's name.  There is
  66. + no way to automatically create or delete files or branches; it has to be done
  67. + from the shell.  (On the other hand, if the branch has a (UNIX) directory in
  68. + the "uploads" directory, uploads will be logged there in such a way that the
  69. + log entry may be simply copied from the upload-log to the directory.)
  70. + Note that each branch is represented by a UNIX directory in the "library"
  71. + directory.  The name should be lowercase, although user input of the name
  72. + and the name listed in the "directory" file are case-independent.  If uploads
  73. + are to be permitted, a directory of the same name should be created in the
  74. + "upload" directory.
  75. + ---
  76.   UNaXcess depends on being setuid to its owner, not only for permissions in
  77.   the BBS, but also to insure that the home directory (containing the message
  78.   database and config file) can be located.
  79. SHAR_EOF
  80. if test 1982 -ne "`wc -c < 'README.pat'`"
  81. then
  82.     echo shar: error transmitting "'README.pat'" '(should have been 1982 characters)'
  83. fi
  84. fi
  85. echo shar: extracting "'install.pat'" '(1817 characters)'
  86. if test -f 'install.pat'
  87. then
  88.     echo shar: will not over-write existing file "'install.pat'"
  89. else
  90. cat << \SHAR_EOF > 'install.pat'
  91. *** ../temp1/Utilities/install.sh    Mon May 12 07:37:21 1986
  92. --- Utilities/install.sh    Mon May 12 07:43:58 1986
  93. ***************
  94. *** 19,24
  95.   :
  96.   : Yes, the "-> ->" business is copped from Unify.  I sincerely doubt that it is
  97.   : copyrighted, and it is fairly obvious.
  98.   
  99.   if test ! -w /etc/passwd; then
  100.       echo "I'm not running as root.  Please ask a system administrator to run this install"
  101.  
  102. --- 19,25 -----
  103.   :
  104.   : Yes, the "-> ->" business is copped from Unify.  I sincerely doubt that it is
  105.   : copyrighted, and it is fairly obvious.
  106. + :
  107.   
  108.   if test ! -w /etc/passwd; then
  109.       echo "I'm not running as root.  Please ask a system administrator to run this install"
  110. ***************
  111. *** 398,403
  112.   chown $UAOWNER $UAHOME/userfile
  113.   chmod 644 $UAHOME/userfile
  114.   : end of userfile installation
  115.   
  116.   echo ""
  117.   echo "I am going to create a simple new-user bulletin.  It is your job to change it"
  118.  
  119. --- 399,420 -----
  120.   chown $UAOWNER $UAHOME/userfile
  121.   chmod 644 $UAHOME/userfile
  122.   : end of userfile installation
  123. + echo ""
  124. + today="`date | sed -e 's/^... \(...\)  *\([0-9][0-9]*\) [^ ][^ ]* 19\(..\)$/\1\/\2\/\3/'`"
  125. + today="`echo $today | sed -e s/Jan/1/ -e s/Feb/2/ -e s/Mar/3/ -e s/Apr/4/ -e s/May/5/ -e s/Jun/6/`"
  126. + today="`echo $today | sed -e s/Jul/7/ -e s/Aug/8/ -e s/Sep/9/ -e s/Oct/10 -e s/Nov/11/ -e s/Dec/12/`"
  127. + echo "Creating $UAHOME/directory..."
  128. + cat << --LIBCATLG-- > $UAHOME/directory
  129. + branch file GENERAL; $today by $sysop: General up/downloading
  130. + --LIBCATLG--
  131. + chown $UAOWNER $UAHOME/directory
  132. + chmod 644 $UAHOME/directory
  133. + echo "Creating $UAHOME/upload-log..."
  134. + cp /dev/null $UAHOME/upload-log
  135. + chown $UAOWNER $UAHOME/upload-log
  136. + chmod 644 $UAHOME/upload-log
  137. + : end of directory installation
  138.   
  139.   echo ""
  140.   echo "I am going to create a simple new-user bulletin.  It is your job to change it"
  141. SHAR_EOF
  142. if test 1817 -ne "`wc -c < 'install.pat'`"
  143. then
  144.     echo shar: error transmitting "'install.pat'" '(should have been 1817 characters)'
  145. fi
  146. fi
  147. echo shar: extracting "'mkconf.c.pat'" '(442 characters)'
  148. if test -f 'mkconf.c.pat'
  149. then
  150.     echo shar: will not over-write existing file "'mkconf.c.pat'"
  151. else
  152. cat << \SHAR_EOF > 'mkconf.c.pat'
  153. *** ../temp1/Utilities/mkconf.c    Mon May 12 07:37:01 1986
  154. --- Utilities/mkconf.c    Mon May 12 07:50:12 1986
  155. ***************
  156. *** 15,20
  157.       {
  158.       setuid(geteuid());
  159.       umask(022);
  160.       execvp("mkdir", argv);
  161.       }
  162.   
  163.  
  164. --- 15,23 -----
  165.       {
  166.       setuid(geteuid());
  167.       umask(022);
  168. +     /* oops.  UNaXcess is passing two args - only the first is wanted */
  169. +     if (argc >= 3)
  170. +     argv[3] = 0;
  171.       execvp("mkdir", argv);
  172.       }
  173.   
  174. SHAR_EOF
  175. if test 442 -ne "`wc -c < 'mkconf.c.pat'`"
  176. then
  177.     echo shar: error transmitting "'mkconf.c.pat'" '(should have been 442 characters)'
  178. fi
  179. fi
  180. echo shar: extracting "'msg.c.pat'" '(640 characters)'
  181. if test -f 'msg.c.pat'
  182. then
  183.     echo shar: will not over-write existing file "'msg.c.pat'"
  184. else
  185. cat << \SHAR_EOF > 'msg.c.pat'
  186. *** ../temp1/msg.c    Mon May 12 07:38:00 1986
  187. --- msg.c    Mon May 12 07:46:09 1986
  188. ***************
  189. *** 514,520
  190.       struct tm *ltbuf;
  191.       struct user ubuf;
  192.   
  193. !     if (parms.ua_roc && conf[0] == 'r' && conf[1] == '-')
  194.       {
  195.       conf = "general";            /* responses get redirected */
  196.       puts("Read-only conference; message will be added to \"general\".");
  197.  
  198. --- 514,520 -----
  199.       struct tm *ltbuf;
  200.       struct user ubuf;
  201.   
  202. !     if (user.u_access != A_WITNESS && parms.ua_roc && conf[0] == 'r' && conf[1] == '-')
  203.       {
  204.       conf = "general";            /* responses get redirected */
  205.       puts("Read-only conference; message will be added to \"general\".");
  206. SHAR_EOF
  207. if test 640 -ne "`wc -c < 'msg.c.pat'`"
  208. then
  209.     echo shar: error transmitting "'msg.c.pat'" '(should have been 640 characters)'
  210. fi
  211. fi
  212. exit 0
  213. #    End of shell archive
  214.